//
//  AgreementController.m
//  CaiPiao
//
//  Created by l wb on 2018/5/16.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "AgreementController.h"

@interface AgreementController ()<UIWebViewDelegate>
@property (weak, nonatomic) IBOutlet UIWebView *webView;
    
@end

@implementation AgreementController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"注册协议";
    
    self.webView.scrollView.bounces = YES;
    self.webView.scrollView.showsVerticalScrollIndicator = NO;
    self.webView.translatesAutoresizingMaskIntoConstraints = NO;
    self.webView.scrollView.backgroundColor = [UIColor whiteColor];
    
    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"register_protocol" ofType:@"html"];
    NSString *htmlString = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
    NSURL *url = [[NSURL alloc] initWithString:filePath];
    [_webView loadHTMLString:htmlString baseURL:url];
    
}
-(void)webViewDidFinishLoad:(UIWebView *)webView{
    [_webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.style.webkitUserSelect='none';"];
}


@end
